<template>
  <div class="common-form">
    <form @submit.prevent>
      <div class="form-item">
        <label>用户名：</label>
        <input type="text" placeholder="请输入用户名">
      </div>
      <div class="form-item">
        <label>密码：</label>
        <input type="password" placeholder="请输入密码">
      </div>
      <div class="form-item">
        <label>邮箱：</label>
        <input type="email" placeholder="请输入邮箱">
      </div>
      <div class="form-item">
        <label>简介：</label>
        <textarea placeholder="请输入个人简介"></textarea>
      </div>
      <div class="form-actions">
        <button type="submit" class="submit-btn">提交</button>
        <button type="reset" class="reset-btn">重置</button>
      </div>
    </form>
  </div>
</template>

<script>
export default {
  name: 'CommonForm'
}
</script>

<style scoped>
.common-form {
  padding: 20px;
  background: #fff;
  border-radius: 4px;
}

.form-item {
  margin-bottom: 15px;
}

.form-item label {
  display: block;
  margin-bottom: 5px;
  color: #333;
}

.form-item input,
.form-item textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-item textarea {
  height: 80px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.submit-btn,
.reset-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.submit-btn {
  background: #1890ff;
  color: white;
}

.reset-btn {
  background: #f0f0f0;
  color: #666;
}

.submit-btn:hover {
  background: #40a9ff;
}

.reset-btn:hover {
  background: #e0e0e0;
}
</style> 